package com.itheima.six;

public class Breeder {
    public void breed(Animal a){
        a.drink();
        a.eat();
        if(a instanceof Dog){

            Dog d = (Dog) a;
            d.swimming();
        }else if(a instanceof Frog){

            Frog f = (Frog) a;
            f.swimming();
        }
    }
}
